/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gee.util;

import javax.microedition.lcdui.*;
import java.util.Random;

/**
 * 
 * @author Coco
 */
public class SystemUtil {

	private static Random random = new Random();

	public static void ClearSC(Graphics g, int color) {
		g.setClip(0, 0, StaticConst.SC_WIDTH, StaticConst.SC_HEIGHT);
		g.setColor(color);
		g.fillRect(0, 0, StaticConst.SC_WIDTH, StaticConst.SC_HEIGHT);
	}

	public static int GetRandom(int data) {
		int rand = random.nextInt();
		return Math.abs(rand % data);
	}

	public static int GetRandom(int rs, int re)// 获取随机数
	{
		int tmp = rs + Math.abs(new Random().nextInt() % (re - rs + 1));
		return tmp;
	}
}
